1. Field
Example embodiments relate to transcoding video data, for example, to an apparatus for and a method of transcoding moving picture experts group (MPEG)-2 data into H.264 data through a combination of inverse discrete cosine transform (IDCT) in MPEG-2 encoding and integer transform in H.264 encoding by approximating an integer transform matrix in H.264 encoding to a discrete cosine transform (DCT) matrix in MPEG-2 encoding.
2. Description of the Related Art
There are various video data encoding methods. For example, video data may be encoded into a moving picture experts group (MPEG)-2 format in high-definition (HD) televisions and digital versatile disks (DVDs) and may be encoded into an H.264 format in HD-DVD and BL-DVD. A user may be view a video by decoding encoded video data (e.g., encoding data) using a receiving device (or a reproducing device) suitable for the format of the encoded video data.
However, when the format of the encoded video data is not supported by the user's receiving device, the user cannot decode the encoded video data. For example, when the user's receiving device supports an H.264 format and the encoded data is in the MPEG-2 format, the user's receiving device cannot directly decode the encoded video data in the MPEG-2 format (e.g., MPEG-2 data). As a result, the MPEG-2 data should be transcoded into the encoded video data in the H.264 format (e.g., H.264 data).
The encoding of video data may be performed by transforming the video data using discrete cosine transform (DCT), quantizing the transformed video data, and encoding the quantized video data using entropy encoding. The decoding of encoded video data may be performed through an inverse process to encoding. Thus, the decoding may be performed by decoding the encoded video data using entropy decoding, dequantizing the decoded video data, and inversely transforming the dequantized video data.
A simple method of transforming MEPG-2 data into H.264 data based on such encoding and decoding of video data may be a pixel region transforming method in which MPEG-2 data may be transformed into pixels and the pixels may be encoded into H.264 data.
FIG. 1 is a block diagram of a conventional transcoder 100.
The transcoder 100 may use a pixel region transforming method. In other words, a dequantization unit 110 may generate a DCT coefficient by dequantizing MPEG-2 data. An inverse discrete cosine transform (IDCT) unit 130 may generate a video signal by performing IDCT on the DCT coefficients, thereby transforming the MPEG-2 data into pixels.
An integer transform unit 150 may generate an integer transform coefficient by performing integer transform on video data that may be transformed into the pixels. A quantization unit 170 may generate H.264 data by quantizing the integer transform coefficient.
However, the pixel region transforming method may be inefficient in terms of time and/or cost because encoding and decoding in two formats is performed.
MPEG-2 data may also be transformed into H.264 data using a method of mutually combining corresponding processes between decoding in the MPEG-2 format and encoding in the H.264 format, for example, a transform region transforming method.
During encoding in the MPEG-2 format, dequantized data may undergo IDCT. During encoding in the H.264 format, video data may undergo integer transformation. In the transform region transforming method, a DCT coefficient transformed by IDCT may be transformed into an integer transform coefficient.
In general, a DCT coefficient in the MPEG-2 format may have an 8×8 matrix form and a DCT coefficient in the H.264 format may have a 4×4 matrix form. A 4×4 integer transform coefficient matrix may be obtained by approximating the 4×4 DCT coefficient matrix for integer calculation. The 4×4 integer transform coefficient matrix may have some symmetric elements, but its element arrangement may be different from that of a DCT matrix. Thus, a simple transform of the 8×8 DCT coefficient matrix into an integer transform coefficient matrix may not reduce the amount of computation.
An 8×8 DCT coefficient may be transformed into an integer transform coefficient using two or more methods. One may combine an 8×8 DCT coefficient matrix with four integer transform coefficient matrices and multiply every element of the resulting matrix by 128, thereby transforming the 8×8 DCT coefficient matrix into an integer form. This method may be characterized by processing real-number calculations into integer calculations, but may require a large amount of computation.
Another may divide the 8×8 DCT coefficient matrix into a multiplication form of several simple matrices, as in a fast DCT algorithm. This method may be characterized by approximating elements of a matrix including multiplication as the exponents of 2 that may be processed by a shift operation. However, a larger error may occur and/or the number of required addition and shift operations may increase.